﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace Hired
{
    public partial class applyjob : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            lblCompany.Text = (string)Session["company"];
            JobseekerAccount js = DBJobseekerAccount.retrieveJobseekerAccountbyUsername(User.Identity.Name, true);
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            JobApplication ja = new JobApplication();
            Job j = DBJob.RetrieveJob((string)Session["id"]);
            ja.JAccountID = User.Identity.Name;
            ja.Contents = txtContent.Text;
            ja.MarkedAsRead = "N";
           
            DBJobApplication.AddJobApplication(ja, j);
            txtContent.Enabled = false;
            lblSent.Visible = true;
        }
        
    }
}